import {DashboardPage} from "../../components/dashboardPages/DashboardPage";
import React, {FC} from "react";
import {observer} from "mobx-react-lite";

export function observerDashboardPageWrapper<T>(page:React.FC<T>,path:string,title:string):DashboardPage<T>{
    let observerComponent: React.FunctionComponent<T> = observer(page);
    let dashboardPage = observerComponent as DashboardPage<T>;
    dashboardPage.path = path
    dashboardPage.title = title
    return dashboardPage
}